aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/fund/[id]/sweep
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-10-31 09:34:16 -0700
committerAdam Soltys <[email protected]>2024-10-31 09:34:16 -0700
commit243abb0a3d29e8e34e263eec843488e3bdb468a4 (patch)
treebe55931ba0f3c110c3001f56a5339cb63e78b761 /src/routes/(app)/fund/[id]/sweep
parent4742e72ec25823ceeea7848fb2e1f868bed7f472 (diff)
downloadcoinos-ui-243abb0a3d29e8e34e263eec843488e3bdb468a4.tar.gz
coinos-ui-243abb0a3d29e8e34e263eec843488e3bdb468a4.zip
biome
Diffstat (limited to 'src/routes/(app)/fund/[id]/sweep')
-rw-r--r--src/routes/(app)/fund/[id]/sweep/+page.server.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/routes/(app)/fund/[id]/sweep/+page.server.ts b/src/routes/(app)/fund/[id]/sweep/+page.server.ts
index 613cf8e2..5bb42fa4 100644
--- a/src/routes/(app)/fund/[id]/sweep/+page.server.ts
+++ b/src/routes/(app)/fund/[id]/sweep/+page.server.ts
@@ -2,12 +2,12 @@ import { get, auth, post } from "$lib/utils";
import { redirect } from "@sveltejs/kit";
export async function load({ cookies, params, parent }) {
- let { user } = await parent();
- let { id } = params;
- let { amount } = await get(`/fund/${id}`);
+ const { user } = await parent();
+ const { id } = params;
+ const { amount } = await get(`/fund/${id}`);
- if (!amount) redirect(307, `/fund/${id}`);
- if (!user) redirect(307, `/register?redirect=/fund/${id}/sweep`);
- await post("/take", { amount, id }, auth(cookies));
- return { amount, id };
+ if (!amount) redirect(307, `/fund/${id}`);
+ if (!user) redirect(307, `/register?redirect=/fund/${id}/sweep`);
+ await post("/take", { amount, id }, auth(cookies));
+ return { amount, id };
}